import request from "@/utils/request";

// 获取水质指标模板列表
export function getWaterQualityTemplateList(params) {
	return request({
		url: "/operation/web/operationWaterQualityTemplateItem/list",
		method: "get",
		params,
	});
}

// 获取水质指标模板详细信息
export function getWaterQualityTemplateDetail(templateId) {
	return request({
		url: `/operation/web/operationWaterQualityTemplateItem/${templateId}`,
		method: "get",
	});
}

// 新增水质指标模板
export function addWaterQualityTemplate(data) {
	return request({
		url: "/operation/web/operationWaterQualityTemplateItem",
		method: "post",
		data,
	});
}

// 修改水质指标模板
export function updateWaterQualityTemplate(data) {
	return request({
		url: "/operation/web/operationWaterQualityTemplateItem",
		method: "put",
		data,
	});
}

// 删除水质指标模板
export function deleteWaterQualityTemplate(templateIds) {
	return request({
		url: `/operation/web/operationWaterQualityTemplateItem/${templateIds}`,
		method: "delete",
	});
}

// 获取基础指标下拉列表
export function getBasicIndexList() {
	return request({
		url: "/operation/web/operationWaterQualityTemplate/basicIndexList",
		method: "get",
	});
}

// 获取水质指标模板列表
export function getTemplateList(params) {
	return request({
		url: "/operation/web/operationWaterQualityTemplate/list",
		method: "get",
		params,
	});
}

// 获取水质指标模板详情
export function getTemplateDetail(templateId) {
	return request({
		url: `/operation/web/operationWaterQualityTemplate/${templateId}`,
		method: "get",
	});
}

// 新增水质指标模板
export function addTemplate(data) {
	return request({
		url: "/operation/web/operationWaterQualityTemplate",
		method: "post",
		data,
	});
}

// 修改水质指标模板
export function updateTemplate(data) {
	return request({
		url: "/operation/web/operationWaterQualityTemplate",
		method: "put",
		data,
	});
}

// 删除水质指标模板
export function deleteTemplate(templateIds) {
	return request({
		url: `/operation/web/operationWaterQualityTemplate/${templateIds}`,
		method: "delete",
	});
}
